package vip.sweet.biz.modular.expert.controller;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import vip.sweet.biz.modular.expert.params.BizExpertProjectsAddParams;
import vip.sweet.biz.modular.expert.service.BizExpertProjectsService;
import vip.sweet.common.enums.ResponseEnum;
import vip.sweet.common.response.CommonResponse;

/**
 * @author ASUS
 * @Date 2025/10/5 11:03
 * @Descripition
 */
@RestController
@RequestMapping("/biz/expertProjects")
@Tag(name = "专家项目控制器")
@Slf4j
public class BizExpertProjectsController {
    @Resource
    private BizExpertProjectsService bizExpertProjectsService;
    @PostMapping("/add")
    @Operation(summary = "添加专家项目接口")
    public CommonResponse add(@RequestBody @Validated BizExpertProjectsAddParams bizExpertProjectsAddParams){
        return bizExpertProjectsService.add(bizExpertProjectsAddParams)? CommonResponse.success("添加成功") : CommonResponse.error(ResponseEnum.ERROR);
    }
}
